import json
import nacos

# SERVER_ADDRESSES = "192.168.171.130:8848"
# SERVER_ADDRESSES = "10.210.98.75:8848"
SERVER_ADDRESSES = "10.210.3.96:8848"
# NAMESPACE = "3d6b071c-6767-4f81-9712-64e1a0cd7736"
NAMESPACE = "b53aa545-2235-46a9-a6db-c82a7488e980"

client = nacos.NacosClient(SERVER_ADDRESSES, namespace="")

# get config
data_id = "bqx-pms-atom-prd.yaml"
group = "DEFAULT_GROUP"
content = """
dms.app.openapi.auth.users: 
  -
    authId: 12345
    token: 45678
    whiteIps: 10.34.163.*;10.34.162.1 -128;127.0.0.1;218.22.73.94
  -
    authId: 5325326
    token: 326236
    whiteIps: 10.34.163.*;10.34.162.1 -128;127.0.0.1;218.22.73.94

dms.app.openapi.threadConfig:
singleThreadSize: 3000
maxThreadNum: 6        
"""
print(client.get_config(data_id, group))
